﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Text;
using Zj.CourseManage.Domain.Core;

namespace Zj.CourseManage.DTO.Common
{
    /// <summary>
    /// department data transfer object
    /// </summary>
    public class DepartmentDTO
    {
        public int Id { get; set; }



        [Required(ErrorMessage ="学院名称必填")]
        [Display(Name ="学院名称")]
        [StringLength(30, MinimumLength = 3,ErrorMessage ="学院名称不超过30个字符，最少不少于3个字符")]
        public string Name { get; set; }


        [Display(Name = "学生")]
        public virtual ICollection<Student> Students { get; set; }




        [Display(Name="学院预算")]
        [DisplayFormat(DataFormatString ="{0:C}")]
        [DataType(DataType.Currency)]
        public decimal Budget { get; set; }
    }
}
